<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title></title>
    <script type="text/javascript" src="Scripts/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="Scripts/ServletAddress.js"></script>      
    <script type="text/javascript"  src="Scripts/json2.js"></script>	
    <script type="text/javascript">
	$(document).ready(function(){

		$("#post").click(function(){
			//alert();
			 var keyword={
			 "keyword":"2室2厅1卫"
			 };
				
			$.post("http://localhost:8090/RealHouse/Search",JSON.stringify(keyword),function(data){
				
				 var data=$.parseJSON(data);
				 $("#txt").html(data[10].HID);
				// alert(data.length);
				 //var len=data.length;
				
				 //alert(data);
			});

			
		});
				
				
				
				$("#getJSON").click(function() {					
					jQuery.getJSON(ServletAddress+pushAddress+"HID=111",function(jsresult){	
					//alert(jsresult.UID);
					var len=null;
					if(jsresult.length<=10)
					{
						len=jsresult.length;
					}
					else
					{
						len=10;
					}
					//alert(len);
					//alert(jsresult[1].title);
					alert(jsresult.length);
					alert(jsresult[0]);
					//var xx=jsresult[1].location.lng;
					
					
					});
				});			
				
				});
    </script>   
  </head>
  <body>
  <h4 id="txt">dfdg</h4>
  <input type="button" id="post" value="post()"/>
  <div id="jq"></div>
  <input type="button" id="getJSON" value="getJSON"/>
   <div id="json"></div>
  
    
  </body>
</html>
